package easy;

public class Solution_1342 {

    public int numberOfSteps(int num) {
        int count = 0;
        while (num > 0) {
            int mod = num % 2;
            if (mod == 1) {
                num--;
            } else {
                num >>= 1;
            }
            count++;
        }
        return count;
    }

    public static void main(String[] args) {
        Solution_1342 model = new Solution_1342();
        System.out.println(model.numberOfSteps(14));
        System.out.println(model.numberOfSteps(8));
    }
}
